<?php error_reporting(0) ?>
<input 
    type="hidden" 
    value="<?php echo $item->Id ?>" 
    id="Id" name="Id"
    />

<form id="_form_edit_panel" name="_form_edit_panel" 
      action="" method="POST" onsubmit="return false;"
      target="integration_asynchronous" autocomplete="off">
    <input 
        type="hidden" 
        value="<?php echo $type ?>" 
        id="Type" name="Type"
        />
    <input 
        type="hidden" 
        value="1" 
        id="Cat" name="Cat"
        />
	<div class="widget- row-fluid">
		<div class="well form-horizontal" style="border:none">
			
			<div class="control-group">
				<label class="control-label">Title :</label>
				<div class="controls">
					<input type="text" 
						class="span12 validate[required]"
						data-prompt-position="topLeft:-1,-5"
						onblur="AliasTo('#Title','#Alias');"
						id="Title" name="Title" 
						value="<?php echo quotes_to_entities($item->Title) ?>"
						/>
			   </div>
			</div>
			
			<div class="control-group">
				<label class="control-label">Alias :</label>
				<div class="controls">
					<input type="text" 
						class="span12 validate[required]"
						data-prompt-position="topLeft:-1,-5"
						id="Alias" name="Alias" 
						value="<?php echo quotes_to_entities($item->Alias) ?>"
						/>
			   </div>
			</div>
			
			<div class="control-group">
				<label class="control-label">Parent</label>
				<div class="controls">
					
					<select id="Parent" name="Parent" class=" span12">
						<option value="0">[ Root ]</option>
						<?php
						
						foreach ($cates as $c){
							if($c->Id==$item->Id){
								$level=$c->Level;
							}
							if(isset($level) && $c->Level<=$level && $c->Id!=$item->Id){
								unset($level);
							}
							?>
						<option 
							<?php if(isset($level) && $level<$c->Level) echo 'disabled=1' ?>
							<?php if($c->Id==$item->Id) echo 'disabled=1'?>
							<?php if($c->Id==$item->Parent) echo 'selected=1'?>
							value="<?php echo $c->Id?>">
							<?php echo quotes_to_entities($c->Display)?>
							
						</option>
							<?php
						}
						?>
					</select>
						
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">BANNER  :</label>
				<div class="controls">
					<input type="text" class="uneditable-input span12" 
						id="Thumb" name="Thumb" 
						value="<?php echo quotes_to_entities($item->Thumb) ?>"
						/>
					<i class="icon-picture field-icon" 
						onclick="BrowseServer('#Thumb')"
						title="THUMB"></i>
			   </div>
			</div>
			<div class="control-group">
				<label class="control-label">Desc :</label>
				<div class="controls">
					<textarea 
						rows="1" cols="5" 
						id="Desc" name="Desc" class="span12"
						><?php echo quotes_to_entities($item->Desc) ?></textarea>
						
			   </div>
			</div>
			
			<div class="control-group">
				<label class="control-label">&nbsp;</label>
				<div class="controls">
					<div>
						<?php if(!empty($item->Insert)) echo "Created  : $item->Insert" ?>
					</div>
					<div>
						<?php if(!empty($item->Update)) echo "Modified : $item->Update" ?>
					</div>
				</div>
			</div>
		</div>
	</div>
	
    
    
</form>